﻿using NLog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WOMPS
{
    static class Program
    {
        private static Logger logger = LogManager.GetCurrentClassLogger(); 
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            // Check for args:
            if (args.Length == 0)
            {
                if (logger.IsInfoEnabled)
                {
                    logger.Info("Start Application");
                }
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new frmWOMPS());
                if (logger.IsInfoEnabled)
                {
                    logger.Info("End Application");
                }
            }
            else
            {
                if (logger.IsInfoEnabled)
                {
                    logger.Info("Start Application  Silently -(" + args[0] +")");
                }
                //set globals
                FileAccess.SetGlobals();
                //run
                Run.Go();
                if (logger.IsInfoEnabled)
                {
                    logger.Info("End Application Silently");
                }
            }

        }
    }
}
